package com.example.webmodule.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.webmodule.model.ServiceInterface;

//@Mapper
public interface ServiceInterfaceMapper extends BaseMapper<ServiceInterface>
{

//    @Select("SELECT * FROM service_interface_tbl")
//    @Results(id = "ServiceInterfaceResultMap", value = {
//        @Result(property = "id", column = "id"),
//        @Result(property = "ip", column = "ip"),
//        @Result(property = "port", column = "port"),
//        @Result(property = "uri", column = "uri"),
//        @Result(property = "metadata", column = "metadata"),
//        @Result(property = "instanceId", column = "instanceId"),
//        @Result(property = "serviceId", column = "serviceId"),
//        @Result(property = "scheme", column = "scheme"),
//        @Result(property = "createdAt", column = "created_at")
//    })
//    List<ServiceInterface> selectAll();
//
//    @Select("SELECT * FROM service_interface_tbl WHERE id = #{id}")
//    @ResultMap("ServiceInterfaceResultMap")
//    ServiceInterface selectById(int id);
//
////    @Insert("INSERT INTO service_interface_tbl (ip, port, uri, metadata, instanceId, serviceId, scheme) " +
////            "VALUES (#{ip}, #{port}, #{uri}, #{metadata}, #{instanceId}, #{serviceId}, #{scheme})")
////    @Options(useGeneratedKeys = true, keyProperty = "id")
////    void insert(ServiceInterface serviceInterface);
//
//    @Update("UPDATE service_interface_tbl " +
//            "SET ip = #{ip}, port = #{port}, uri = #{uri}, metadata = #{metadata}, " +
//            "instanceId = #{instanceId}, serviceId = #{serviceId}, scheme = #{scheme} " +
//            "WHERE id = #{id}")
//    void update(ServiceInterface serviceInterface);
//
//    @Delete("DELETE FROM service_interface_tbl WHERE id = #{id}")
//    void deleteById(int id);
}